home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
o2d011.zip
/
O2D.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1992-12-06
|
11KB
|
325 lines
ΓòÉΓòÉΓòÉ 1. O2D Syntax ΓòÉΓòÉΓòÉ
Γöî ΓöÉ Γöî ΓöÉ Γöî ΓöÉ Γöî ΓöÉ
O2D Pgm_file_spec Γöé/cwd:path_specΓöé Γöé/env:env_filespecΓöé Γöé/nowaitΓöé Γöétarget_app_optsΓöé
Γöö Γöÿ Γöö Γöÿ Γöö Γöÿ Γöö Γöÿ
Program_file_spec
Name of program .EXE file or name of a DOS .BAT batch file.
If you use the /cwd operand to establish a current working directory,
then the program file name may not need to have a fully qualified
path included.
/cwd:
Current working directory.
The path_spec value is a path to a directory and may contain a drive
letter.
/env:
Environment file name.
This names the ASCII text file containing the DOS settings parameter
names and values you want to use in establishing the DOS session.
The parameters are used only during the DosStartSession processing to
define the new DOS session.
/nowait
No WAIT option.
This tells O2D to create an independent DOS session and not to WAIT
for the DOS session to terminate before O2D itself terminates. If the
/nowait option is not used, then O2D will create the DOS session and
then WAIT for the DOS session to terminate before O2D itself ends and
returns control to the command line or to the
target_app_opts
Target application operands
These operands will be passed to the target DOS application, which is
either a program or .BAT batch file for use by the target
application.
ΓòÉΓòÉΓòÉ 2. Examples ΓòÉΓòÉΓòÉ
The following examples show some uses of O2D:
o2d myapp.exe /cwd:d:\myapp uopt1 uopt2
The above will invoke the myapp.exe program as a DOS session, first doing a
chdir to change the current directory to d Note that this may also change the
default drive at the same time. O2D passes the operands "uopt1 uopt2" to
myapp.exe as part of its command line. No special environment is established
for myapp.exe.
o2d myapp.exe /cwd:d:\myapp /env:myapp.env uopt1 uopt2
The above does the same as the preceding example but also tells O2D to read the
myapp.env file to define DOS session settings used to create the new session.
ΓòÉΓòÉΓòÉ 3. Function of O2D ΓòÉΓòÉΓòÉ
O2D is an OS/2 session command line utility for use in .CMD batch files and in
O2D runs in an OS/2 window or FS session and is used to start a DOS application
session.
You can define DOS session parameters for the new session using the same
session parameters as you can access through the usual desktop folder method of
defining DOS applications. O2D extends the functionality of the command line
environment to provide you with a more useful interface to your DOS
applications.
ΓòÉΓòÉΓòÉ 4. O2D Versus START ΓòÉΓòÉΓòÉ
The START command can be used to create a DOS session in both windowed and FS
modes. However, START does not wait for the new DOS session to terminate
before control is returned to the
The START command cannot provide all the DOS session parameters that a folder
can.
O2D can WAIT for a DOS session to end before control returns to the next
statement in the .CMD file, or you can have O2D start an independent DOS
session by using the /nowait command line operand. O2D also provides support
for the usual folder DOS session parameters such as DPMI_DOS_API=ENABLED, or
DOS_STARTUP_DRIVE, which allows you to launch a specially constructed DOS
session from your OS/2 .CMD files.
ΓòÉΓòÉΓòÉ 5. Contents of Environment File ΓòÉΓòÉΓòÉ
Example of ASCII Environment File records: (shows all keys) Only some of the
keywords below are usually used:
DOS_BACKGROUND_EXECUTION=ON
DOS_BREAK=OFF
DOS_DEVICE= /* device.sys filename */
DOS_FCBS=16
DOS_FCBS_KEEP=8
DOS_FILES=20
DOS_HIGH=ON
DOS_LASTDRIVE=J
DOS_RMSIZE=640
DOS_SHELL=D:\OS2\MDOS\COMMAND.COM D:\OS2\MDOS /P
DOS_STARTUP_DRIVE= /* filespec for VMDISK DOS file */
DOS_UMB=ON
DOS_VERSION= /* special DOS settings required for app */
DPMI_DOS_API=ENABLED
DPMI_MEMORY_LIMIT=3
DPMI_NETWORK_BUFF_SIZE=8
EMS_FRAME_LOCATION=AUTO
EMS_HIGH_OS_MAP_REGION=32
EMS_LOW_OS_MAP_REGION=384
EMS_MEMORY_LIMIT=2048
HW_NOSOUND=OFF
HW_ROM_TO_RAM=OFF
HW_TIMER=OFF
IDLE_SECONDS=15
IDLE_SENSITIVITY=75
KBD_ALTHOME_BYPASS=OFF
KBD_BUFFER_EXTEND=ON
KBD_CTRL_BYPASS=OFF
KBD_RATE_LOCK=OFF
MEM_EXCLUDE_REGIONS=
MEM_INCLUDE_REGIONS=
MOUSE_EXCLUSIVE_ACCESS=OFF
PRINT_TIMEOUT=15
VIDEO_FASTPASTE=ON
VIDEO_MODE_RESTRICTION=NONE
VIDEO_ONDEMAND_MEMORY=ON
VIDEO_RETRACE_EMULATION=OFF
VIDEO_ROM_EMULATION=OFF
VIDEO_SWITCH_NOTIFICATION=ON
VIDEO_WINDOW_REFRESH=1
XMS_HANDLES=32
XMS_MEMORY_LIMIT=2048
XMS_MINIMUM_HMA=0
O2D provides support for the keywords in the DOS SESSION parameters in the
program folder, thus giving .CMD and REXX programs the same DOS application
features as provided by the program folder DOS SESSION parameters.
ΓòÉΓòÉΓòÉ 6. Sample DOS .BAT File ΓòÉΓòÉΓòÉ
You can use a .BAT file instead of referring to a .EXE program file as the
target of O2D, and have the .BAT batch file do special SET commands and other
processing needed to establish the DOS environment for the target application.
O2D cannot affect the DOS ENVIRONMENT that is seen by the target application
program. Only a .BAT file that executes the target .EXE program can establish
SET variables for use by the target program, unless you alter the global OS/2
AUTOEXEC.BAT found in the OS/2 boot drive root directory. Changing the global
AUTOEXEC.BAT file will affect all DOS sessions started by folders and from
command lines.
O2D gives you a more refined way to establish DOS session settings and also use
.BAT files to establish special PATH and SET values for use by each individual
DOS application.
The DOS .BAT file contents listed below are used to launch the BorlandC
compiler from a .CMD REXX program that first tests for the proper dismountable
disk in a Bernoulli drive before using O2D to start the DOS session with
BorlandC compiler.
PATH=G:\BorlandC\BIN;E:\CSOURCE\BIN;%PATH%
E:
CD \CSOURCE
SET LIB=g:\BorlandC\LIB
SET INCLUDE=E:\CSOURCE\COMMON;E:\CSOURCE;G:\BorlandC\INCLUDE
SET HELP=G:\BorlandC\BIN
LOADHIGH G:\BorlandC\BIN\BC.EXE
EXIT
Notice that the SET commands establish the needed PATH, LIB, INCLUDE, and HELP
values referenced by the compiler. Using O2D in this fashion, you can freely
create different tailored DOS execution environments for any application.
ΓòÉΓòÉΓòÉ 7. REXX .CMD to use .BAT File ΓòÉΓòÉΓòÉ
Below is the .CMD file REXX program to test for the proper Bernoulli disk
mounted and ready for use.
/* REXX BorlandC */
BorlandDrive="G"
ifo="";
ifo=sysdriveinfo(BorlandDrive);
if ifo ="" then do;
say "Drive" BorlandDrive "is not mounted.";
say "Please mount Bernoulli disk labelled BorlandC in drive" BorlandDrive;
say "Press any key to continue.";
irc=SysGetKey();
ifo="";
ifo=sysdriveinfo(BorlandDrive);
if ifo = "" then do;
say "Drive" BorlandDrive "is not mounted.";
say "Abandoning attempt to use BorlandC.";
exit;
else say "OK. Continuing.";
end;
end;
'D:\OS2\APPS\O2D.EXE BorlandC.BAT /cwd:d:\os2\APPS /env:BorlandC.INI'
exit;
ΓòÉΓòÉΓòÉ 8. Installation ΓòÉΓòÉΓòÉ
You've already unzipped the files, since you're reading this file.
To make it easier for you to display this file, you can define a desktop or
Information folder object that uses the VIEW program to view this file:
Program: VIEW.EXE
Optional Parameters: O2D.INF
You then open the folder to display the help information, or you can ask O2D to
do so by issuing the command:
o2d /?
When you are creating a folder for help display, provide the full path to the
O2D.INF file for the folder unless you've copied the O2D.INF file to one of the
directories in the BOOKSHELF= path spec. You can view the BOOKSHELF= list of
directories by issuing the command:
SET | MORE
Look for the BOOKSHELF= entry and then copy the O2D.INF file to one of the
directories, usually the \OS2\BOOK one.
To make the use of O2D easier, copy the O2D.EXE file to your \OS2\APPS
directory, which is usually in the PATH.
To make this program available to your friends, provide them with a copy of the
original O2D011.ZIP file in addition to any other files you provide in expanded
form. The original .ZIP file contains PKZip internal authentication checks
that the author has purchased to ensure that program files compressed by this
utility from PkWare, Inc. are not corrupted. PKUNZIP version 1.1 is needed to
unzip the files.
ΓòÉΓòÉΓòÉ 9. Notices ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 9.1. Copyright ΓòÉΓòÉΓòÉ
O2D.C Copyright (c) 1992 Bruce E. HФgman. All Rights Reserved. Ver 1.1 921206
ΓòÉΓòÉΓòÉ 9.2. Ver 1.1 Updates ΓòÉΓòÉΓòÉ
This version corrects a fault found in code that restores the saved default
drive and current working directory. Thanks to Compuserve user 72360,471 for
finding and reporting this fault. The fault occurred when O2D was invoked when
the current working directory was the root of any drive. This error has been
corrected in the current version.
ΓòÉΓòÉΓòÉ 9.3. Author ΓòÉΓòÉΓòÉ
Bruce E. HФgman Electronic Addresses:
629 South 24th St. Compuserve 72050,1327
Arlington VA 22202-2525 Internet butch@glib.org
About the Author
The author is a systems programming professional with over 25 years of
programming experience. He's a former US Air Force Technical Instructor, and
he taught at Lowry AFB in Denver CO, at the US Marine Corps Computer Sciences
School, Quantico VA, and also during evenings at Northern Virginia Community
College.
He now works as a Senior Systems Engineer for Electronic Data Systems
Corporation, Government Services Division, Herndon VA, at a federal government
account.
His central expertise is in IBM mainframe MVS systems, but he's also
experienced in IBM PC systems, operating systems, Windows, and common end user
utility development. Programming languages include assembler, PL1, COBOL,
FORTRAN, C, BASIC, and many lesser dialects.
Bruce is active on Compuserve and Washington DC area computer BBSs and welcomes
questions from professional colleagues and other users.
ΓòÉΓòÉΓòÉ 9.4. License - End User ΓòÉΓòÉΓòÉ
You, the end user, can use this program without paying a fee.
You, the end user and owners and operators of private and public computer
bulletin board (BBS) services, may also distribute the original O2D011.ZIP file
to anyone else, as long as the file is not altered in any way. Alterations to
the O2D011.ZIP file, including changes to the .ZIP comments that identify the
author, void your license to distribute the files. The original O2D011.ZIP
file is identified by the PKUNZIP authentication messages.
Commercial distributors of shareware may include the original O2D011.ZIP file
on their distribution diskettes only by obtaining a license to distribute from
the author.
ΓòÉΓòÉΓòÉ 9.5. Warranty: ΓòÉΓòÉΓòÉ
This program is provided as is, without any express or implied warranty,
including, but not limited to, the implied warranties of merchantability and
fitness for a particular purpose. Some states do not allow the exclusion of
implied warranties, so the above exclusion may not apply to you. This limited
warranty gives you specific legal rights, and you may also have other rights
which vary from state to state.
ΓòÉΓòÉΓòÉ 9.6. Source Code Availability ΓòÉΓòÉΓòÉ
Complete commented source code is available on request from the author for a
nominal fee to cover disk and shipping.